home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
029a
/
lite411q.zip
/
LDEMO2.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-07-25
|
4KB
|
118 lines
'============================================================================
'
' LDEMO2.BAS - LITE Window Demo #2
' ProWindows(tm) LITE 4.00
' (c) Copyright 1988-1991 DSE Software Publishing
'
'==========================================================================
'
' To make use of this demonstration program, you must load BASIC
' EXATCLY as follows:
'
' QB LDEMO2 /AH /L LITEDEMO (for QuickBASIC)
' QBX LDEMO2 /AH /EA /L LITEDEMO (for BASIC PDS 7)
'
'==========================================================================
REM $DYNAMIC
DEFINT A-Z
' =======================================================================
' INCLUDE modules should follow
' =======================================================================
REM $INCLUDE: 'lite.bi'
DECLARE FUNCTION PeekI% (segment%, offset%)
DECLARE FUNCTION RAND%
DECLARE SUB SEEDRAND (SEED%)
'CLEAR , , 4096& ' Set aside additional stack space
' =======================================================================
' These constants should be defined in ALL applications.
' =======================================================================
CONST WINMEMSIZE% = 8191 ' Window memory, used by 'VirMem%()'
CONST SCRNMEMSIZE% = 4096 ' Screen storage memory, used by 'scrn%()'
CONST MAXWINDOWS% = 30 ' Maximum number of windows
' =======================================================================
' Be sure to DIM your variables
' =======================================================================
DIM SHARED VirMem(WINMEMSIZE) AS INTEGER
DIM SHARED scrn(SCRNMEMSIZE) AS INTEGER
DIM SHARED vcb(MAXWINDOWS) AS vircb
DIM SHARED wcb(MAXWINDOWS) AS wincb
DIM SHARED wcbndx(MAXWINDOWS) AS INTEGER
' =======================================================================
' Program initialization code
' =======================================================================
ReCycleMode 1 ' enable "Video Recycling" saves 24K
InitPro ' initialize ProWindows
MouseInstalled = CheckMouse(buttons)
' =======================================================================
' Your code goes here
' =======================================================================
MainMenu:
' =======================================================================
' Remove next two "REM" statements for simulated monochrome mode
' =======================================================================
REM SetBWmode ENABLE
REM SetMonitorColor 6 '1 is blue, 2 is green, 6 is amber, etc...
FillScreen 1, 1, 25, 80, attr(0, 1), 176, SNOW
OpenWindow 1, 15, 37, attr(0, 7), 1, 1, 1, GlobalOptions
OpenWindow 2, 15, 37, attr(7, 1), 1, 1, 1, GlobalOptions
OpenWindow 3, 15, 37, attr(15, 4), 1, 1, 1, GlobalOptions
OpenWindow 4, 15, 37, attr(15, 2), 1, 1, 1, GlobalOptions
OpenWindow 5, 15, 37, attr(15, 5), 1, 1, 1, GlobalOptions
FOR x = 1 TO 5
setWindow x
TitleWindow 1, "Window" + STR$(x)
NEXT
Notice
DisplayWindow 1, 2, 10, 15, 37
DisplayWindow 2, 4, 15, 15, 37
DisplayWindow 3, 6, 20, 15, 37
DisplayWindow 4, 8, 25, 15, 37
DisplayWindow 5, 10, 30, 15, 37
WHILE INKEY$ = ""
Handle = ABS(RAND) MOD 4 + 1
row = ABS(RAND) MOD 15 + 1
col = ABS(RAND) MOD 40 + 1
MoveWindow Handle, row, col
Handle = ABS(RAND) MOD 4 + 1
MainWindow Handle
WEND
FOR Handle = 1 TO 5
CloseWindow Handle
NEXT
MouseCursorOff
CLS
PRINT "Thanks for running me!"